#include <stdio.h>
#include <string.h>

int main()
{
	int buf[100] = {0};
	int i=0;
	int j=0;
	int len;
	int n;
	fgets(buf,sizeof(buf),stdin);
	puts(buf);
	len = sizeof(buf)/sizeof(buf[0]);
	for(i=0;i<= len - 1;++i);
	{
		for(j=0;j<= len - 1-i;++j)
		{
			if(buf[j]>buf[j+1])
			{
				n=buf[j];
				buf[j]=buf[j+1];
				buf[j+1] = n;
			}
		}
	}
	puts(buf);


	return 0;
}
